<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.17"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>QuEST: utilities.cpp File Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="style.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand"><img alt="Logo" src="logo.png"/></a>
                    <a class="navbar-brand"><b>QuEST</b> v3.2.0<br>The Quantum Exact Simulation Toolkit</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d522931ffa1371640980b621734a4381.html">Users</a></li><li class="navelem"><a class="el" href="dir_70834f0dcd10de01d2e35ab402a2238e.html">tysonjones</a></li><li class="navelem"><a class="el" href="dir_1957401ef452be7528010ba0f4832a45.html">Desktop</a></li><li class="navelem"><a class="el" href="dir_dee4414d5d72b49a9429e079789ffd08.html">GithubRepos</a></li><li class="navelem"><a class="el" href="dir_a89b43d59316bb5045aa22bb53a67d29.html">QuEST</a></li><li class="navelem"><a class="el" href="dir_e791dcdec8c5d319683d04485e4067ac.html">tests</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">utilities.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="QuEST_8h_source.html">QuEST.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="utilities_8hpp_source.html">utilities.hpp</a>&quot;</code><br />
<code>#include &quot;catch.hpp&quot;</code><br />
<code>#include &lt;random&gt;</code><br />
<code>#include &lt;algorithm&gt;</code><br />
<code>#include &lt;bitset&gt;</code><br />
</div>
<p><a href="utilities_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSequenceGenerator.html">SequenceGenerator&lt; T &gt;</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSubListGenerator.html">SubListGenerator</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aba8ab64f4403dbfbd5a38902939535ff"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a>(cond)&#160;&#160;&#160;if (!(cond)) FAIL( );</td></tr>
<tr class="separator:aba8ab64f4403dbfbd5a38902939535ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21e0fa8d57dc566ad149077be8f67a82"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a21e0fa8d57dc566ad149077be8f67a82">macro_copyComplexMatrix</a>(dest,  src)</td></tr>
<tr class="memdesc:a21e0fa8d57dc566ad149077be8f67a82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies ComplexMatrix structures into a QMatrix.  <a href="utilities_8cpp.html#a21e0fa8d57dc566ad149077be8f67a82">More...</a><br /></td></tr>
<tr class="separator:a21e0fa8d57dc566ad149077be8f67a82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ab1cbd3fcacfb4f40e6898da03f8705"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a3ab1cbd3fcacfb4f40e6898da03f8705">macro_copyQMatrix</a>(dest,  src)</td></tr>
<tr class="separator:a3ab1cbd3fcacfb4f40e6898da03f8705"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gacd00096ffcc67d460c204cb833388b0f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gacd00096ffcc67d460c204cb833388b0f">applyReferenceMatrix</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, int *ctrls, int numCtrls, int *targs, int numTargs, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:gacd00096ffcc67d460c204cb833388b0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the density matrix <code>state</code> to be the result of left-multiplying the multi-target operator matrix <code>op</code>, with the specified control and target qubits (in <code>ctrls</code> and <code>targs</code> respectively).  <a href="group__testutilities.html#gacd00096ffcc67d460c204cb833388b0f">More...</a><br /></td></tr>
<tr class="separator:gacd00096ffcc67d460c204cb833388b0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga059fea2ee0415bf25929601ba0788164"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga059fea2ee0415bf25929601ba0788164">applyReferenceMatrix</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, int *ctrls, int numCtrls, int *targs, int numTargs, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:ga059fea2ee0415bf25929601ba0788164"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the state-vector <code>state</code> to be the result of left-multiplying the multi-target operator matrix <code>op</code>, with the specified control and target qubits (in <code>ctrls</code> and <code>targs</code> respectively).  <a href="group__testutilities.html#ga059fea2ee0415bf25929601ba0788164">More...</a><br /></td></tr>
<tr class="separator:ga059fea2ee0415bf25929601ba0788164"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2b197ca736a01f05bf18fbc5c5a9bee6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, int *ctrls, int numCtrls, int *targs, int numTargs, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:ga2b197ca736a01f05bf18fbc5c5a9bee6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the density matrix <code>state</code> to be the result of applying the multi-target operator matrix <code>op</code>, with the specified control and target qubits (in <code>ctrls</code> and <code>targs</code> respectively).  <a href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">More...</a><br /></td></tr>
<tr class="separator:ga2b197ca736a01f05bf18fbc5c5a9bee6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2263bdcb61d571c5ea23d1b6cc5f78cb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga2263bdcb61d571c5ea23d1b6cc5f78cb">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, int *ctrls, int numCtrls, int targ1, int targ2, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:ga2263bdcb61d571c5ea23d1b6cc5f78cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the density matrix <code>state</code> to be the result of applying the two-target operator matrix <code>op</code>, with the specified control qubits (in <code>ctrls</code>).  <a href="group__testutilities.html#ga2263bdcb61d571c5ea23d1b6cc5f78cb">More...</a><br /></td></tr>
<tr class="separator:ga2263bdcb61d571c5ea23d1b6cc5f78cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad6816cb8ec41212e2702b04e10de09e8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gad6816cb8ec41212e2702b04e10de09e8">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, int *ctrls, int numCtrls, int target, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:gad6816cb8ec41212e2702b04e10de09e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the density matrix <code>state</code> to be the result of applying the single-target operator matrix <code>op</code>, with the specified control qubits (in <code>ctrls</code>).  <a href="group__testutilities.html#gad6816cb8ec41212e2702b04e10de09e8">More...</a><br /></td></tr>
<tr class="separator:gad6816cb8ec41212e2702b04e10de09e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac5ee60392d5eb40641862976d7578487"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gac5ee60392d5eb40641862976d7578487">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, int *targs, int numTargs, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:gac5ee60392d5eb40641862976d7578487"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the density matrix <code>state</code> to be the result of applying the multi-target operator matrix <code>op</code>, with no control qubits.  <a href="group__testutilities.html#gac5ee60392d5eb40641862976d7578487">More...</a><br /></td></tr>
<tr class="separator:gac5ee60392d5eb40641862976d7578487"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga891d3dc21ce0159754e8084069e6618b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga891d3dc21ce0159754e8084069e6618b">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, int ctrl, int *targs, int numTargs, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:ga891d3dc21ce0159754e8084069e6618b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the density matrix <code>state</code> to be the result of applying the multi-target operator matrix <code>op</code>, with a single control qubit <code>ctrl</code>.  <a href="group__testutilities.html#ga891d3dc21ce0159754e8084069e6618b">More...</a><br /></td></tr>
<tr class="separator:ga891d3dc21ce0159754e8084069e6618b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93f82b4874355a5df3f052a0bae6e021"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga93f82b4874355a5df3f052a0bae6e021">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, int ctrl, int targ, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:ga93f82b4874355a5df3f052a0bae6e021"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the density matrix <code>state</code> to be the result of applying the single-control single-target operator matrix <code>op</code>.  <a href="group__testutilities.html#ga93f82b4874355a5df3f052a0bae6e021">More...</a><br /></td></tr>
<tr class="separator:ga93f82b4874355a5df3f052a0bae6e021"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaea411c5c551f15872bf72592798c6151"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gaea411c5c551f15872bf72592798c6151">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, int ctrl, int targ1, int targ2, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:gaea411c5c551f15872bf72592798c6151"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the density matrix <code>state</code> to be the result of applying the two-target operator matrix <code>op</code>, with a single control qubit <code>ctrl</code>.  <a href="group__testutilities.html#gaea411c5c551f15872bf72592798c6151">More...</a><br /></td></tr>
<tr class="separator:gaea411c5c551f15872bf72592798c6151"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga74eef70cd0948faa81ea80d0111a2d12"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga74eef70cd0948faa81ea80d0111a2d12">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, int targ, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:ga74eef70cd0948faa81ea80d0111a2d12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the density matrix <code>state</code> to be the result of applying the single-target operator matrix <code>op</code>, with no control qubit.  <a href="group__testutilities.html#ga74eef70cd0948faa81ea80d0111a2d12">More...</a><br /></td></tr>
<tr class="separator:ga74eef70cd0948faa81ea80d0111a2d12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga731c2de4d491629d806a03e0aea2f3a3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga731c2de4d491629d806a03e0aea2f3a3">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, int *ctrls, int numCtrls, int *targs, int numTargs, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:ga731c2de4d491629d806a03e0aea2f3a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the state-vector <code>state</code> to be the result of applying the multi-target operator matrix <code>op</code>, with the specified control and target qubits (in <code>ctrls</code> and <code>targs</code> respectively).  <a href="group__testutilities.html#ga731c2de4d491629d806a03e0aea2f3a3">More...</a><br /></td></tr>
<tr class="separator:ga731c2de4d491629d806a03e0aea2f3a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac49c2a7cb2c041f2ec9fcf65337ada74"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gac49c2a7cb2c041f2ec9fcf65337ada74">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, int *ctrls, int numCtrls, int targ1, int targ2, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:gac49c2a7cb2c041f2ec9fcf65337ada74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the state-vector <code>state</code> to be the result of applying the two-target operator matrix <code>op</code>, with the specified control qubits (in <code>ctrls</code>).  <a href="group__testutilities.html#gac49c2a7cb2c041f2ec9fcf65337ada74">More...</a><br /></td></tr>
<tr class="separator:gac49c2a7cb2c041f2ec9fcf65337ada74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabc5d0ff4b92368b8c095c0246387f52f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gabc5d0ff4b92368b8c095c0246387f52f">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, int *ctrls, int numCtrls, int target, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:gabc5d0ff4b92368b8c095c0246387f52f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the state-vector <code>state</code> to be the result of applying the single-target operator matrix <code>op</code>, with the specified control qubits (in <code>ctrls</code>).  <a href="group__testutilities.html#gabc5d0ff4b92368b8c095c0246387f52f">More...</a><br /></td></tr>
<tr class="separator:gabc5d0ff4b92368b8c095c0246387f52f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga757cf0030f27b9df62789df273bbb1e3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga757cf0030f27b9df62789df273bbb1e3">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, int *targs, int numTargs, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:ga757cf0030f27b9df62789df273bbb1e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the state-vector <code>state</code> to be the result of applying the multi-target operator matrix <code>op</code>, with no contorl qubits.  <a href="group__testutilities.html#ga757cf0030f27b9df62789df273bbb1e3">More...</a><br /></td></tr>
<tr class="separator:ga757cf0030f27b9df62789df273bbb1e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga25dbf51127ac7528c7f36f7b84286680"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga25dbf51127ac7528c7f36f7b84286680">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, int ctrl, int *targs, int numTargs, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:ga25dbf51127ac7528c7f36f7b84286680"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the state-vector <code>state</code> to be the result of applying the multi-target operator matrix <code>op</code>, with a single control qubit (<code>ctrl</code>) This updates <code>state</code> under.  <a href="group__testutilities.html#ga25dbf51127ac7528c7f36f7b84286680">More...</a><br /></td></tr>
<tr class="separator:ga25dbf51127ac7528c7f36f7b84286680"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaadab07060aba3146d82f0c2d1a9cd673"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gaadab07060aba3146d82f0c2d1a9cd673">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, int ctrl, int targ, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:gaadab07060aba3146d82f0c2d1a9cd673"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the state-vector <code>state</code> to be the result of applying the single-target operator matrix <code>op</code>, with a single control qubit (<code>ctrl</code>).  <a href="group__testutilities.html#gaadab07060aba3146d82f0c2d1a9cd673">More...</a><br /></td></tr>
<tr class="separator:gaadab07060aba3146d82f0c2d1a9cd673"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9f194f89bf433b816e4e033eb082b03e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga9f194f89bf433b816e4e033eb082b03e">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, int ctrl, int targ1, int targ2, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:ga9f194f89bf433b816e4e033eb082b03e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the state-vector <code>state</code> to be the result of applying the two-target operator matrix <code>op</code>, with a single control qubit (<code>ctrl</code>).  <a href="group__testutilities.html#ga9f194f89bf433b816e4e033eb082b03e">More...</a><br /></td></tr>
<tr class="separator:ga9f194f89bf433b816e4e033eb082b03e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga79d4e260c948c347200ba82922777abc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga79d4e260c948c347200ba82922777abc">applyReferenceOp</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, int targ, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op)</td></tr>
<tr class="memdesc:ga79d4e260c948c347200ba82922777abc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies the state-vector <code>state</code> to be the result of applying the single-target operator matrix <code>op</code>, with no contorl qubits.  <a href="group__testutilities.html#ga79d4e260c948c347200ba82922777abc">More...</a><br /></td></tr>
<tr class="separator:ga79d4e260c948c347200ba82922777abc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8e8781b9483d2ce7fdac542bb96d1e01"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga8e8781b9483d2ce7fdac542bb96d1e01">areEqual</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> a, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> b)</td></tr>
<tr class="memdesc:ga8e8781b9483d2ce7fdac542bb96d1e01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the absolute value of the difference between every amplitude in matrices <code>a</code> and <code>b</code> is less than <code>REAL_EPS</code>.  <a href="group__testutilities.html#ga8e8781b9483d2ce7fdac542bb96d1e01">More...</a><br /></td></tr>
<tr class="separator:ga8e8781b9483d2ce7fdac542bb96d1e01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaef0526d5c35d20ac42befaa3067188d9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gaef0526d5c35d20ac42befaa3067188d9">areEqual</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> matr)</td></tr>
<tr class="memdesc:gaef0526d5c35d20ac42befaa3067188d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a hardware-agnostic comparison of density-matrix <code>qureg</code> to <code>matr</code>, checking whether the difference between the real and imaginary components of every amplitude is smaller than the QuEST_PREC-specific REAL_EPS (defined in QuEST_precision) precision.  <a href="group__testutilities.html#gaef0526d5c35d20ac42befaa3067188d9">More...</a><br /></td></tr>
<tr class="separator:gaef0526d5c35d20ac42befaa3067188d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga89c312b37e763aa224a008bea7cc381e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga89c312b37e763aa224a008bea7cc381e">areEqual</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> matr, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> precision)</td></tr>
<tr class="memdesc:ga89c312b37e763aa224a008bea7cc381e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a hardware-agnostic comparison of density-matrix <code>qureg</code> to <code>matr</code>, checking whether the difference between the real and imaginary components of every amplitude is smaller than <code>precision</code>.  <a href="group__testutilities.html#ga89c312b37e763aa224a008bea7cc381e">More...</a><br /></td></tr>
<tr class="separator:ga89c312b37e763aa224a008bea7cc381e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga451bbbc6b21cd9c1dbf7a5099edd6077"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga451bbbc6b21cd9c1dbf7a5099edd6077">areEqual</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> vec)</td></tr>
<tr class="memdesc:ga451bbbc6b21cd9c1dbf7a5099edd6077"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a hardware-agnostic comparison of state-vector <code>qureg</code> to <code>vec</code>, checking whether the difference between the real and imaginary components of every amplitude is smaller than the QuEST_PREC-specific REAL_EPS (defined in QuEST_precision) precision.  <a href="group__testutilities.html#ga451bbbc6b21cd9c1dbf7a5099edd6077">More...</a><br /></td></tr>
<tr class="separator:ga451bbbc6b21cd9c1dbf7a5099edd6077"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga448f07d8e8fbc1bd2fb68c614fecdb4c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga448f07d8e8fbc1bd2fb68c614fecdb4c">areEqual</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> vec, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> precision)</td></tr>
<tr class="memdesc:ga448f07d8e8fbc1bd2fb68c614fecdb4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a hardware-agnostic comparison of state-vector <code>qureg</code> to <code>vec</code>, checking whether the difference between the real and imaginary components of every amplitude is smaller than <code>precision</code>.  <a href="group__testutilities.html#ga448f07d8e8fbc1bd2fb68c614fecdb4c">More...</a><br /></td></tr>
<tr class="separator:ga448f07d8e8fbc1bd2fb68c614fecdb4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac0737242d0628e61e3b2a9d39ed0acc6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">areEqual</a> (<a class="el" href="structQureg.html">Qureg</a> qureg1, <a class="el" href="structQureg.html">Qureg</a> qureg2)</td></tr>
<tr class="memdesc:gac0737242d0628e61e3b2a9d39ed0acc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a hardware-agnostic comparison of the given quregs, checking whether the difference between the real and imaginary components of every amplitude is smaller than the QuEST_PREC-specific REAL_EPS (defined in QuEST_precision) precision.  <a href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">More...</a><br /></td></tr>
<tr class="separator:gac0737242d0628e61e3b2a9d39ed0acc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5df082edc3f71b08ef8f420d109fa175"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga5df082edc3f71b08ef8f420d109fa175">areEqual</a> (<a class="el" href="structQureg.html">Qureg</a> qureg1, <a class="el" href="structQureg.html">Qureg</a> qureg2, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> precision)</td></tr>
<tr class="memdesc:ga5df082edc3f71b08ef8f420d109fa175"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a hardware-agnostic comparison of the given quregs, checking whether the difference between the real and imaginary components of every amplitude is smaller than <code>precision</code>.  <a href="group__testutilities.html#ga5df082edc3f71b08ef8f420d109fa175">More...</a><br /></td></tr>
<tr class="separator:ga5df082edc3f71b08ef8f420d109fa175"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga45cc399adad2e2a67b0124851189fae5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga45cc399adad2e2a67b0124851189fae5">areEqual</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> a, <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> b)</td></tr>
<tr class="memdesc:ga45cc399adad2e2a67b0124851189fae5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the absolute value of the difference between every amplitude in vectors <code>a</code> and <code>b</code> is less than <code>REAL_EPS</code>.  <a href="group__testutilities.html#ga45cc399adad2e2a67b0124851189fae5">More...</a><br /></td></tr>
<tr class="separator:ga45cc399adad2e2a67b0124851189fae5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7753296a935e1dc1b6dfb98607cd2afa"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga7753296a935e1dc1b6dfb98607cd2afa">areEqual</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> vec, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *reals, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *imags)</td></tr>
<tr class="memdesc:ga7753296a935e1dc1b6dfb98607cd2afa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the absolute value of the difference between every element in <code>vec</code> and those implied by <code>reals</code> and <code>imags</code>, is less than <code>REAL_EPS</code>.  <a href="group__testutilities.html#ga7753296a935e1dc1b6dfb98607cd2afa">More...</a><br /></td></tr>
<tr class="separator:ga7753296a935e1dc1b6dfb98607cd2afa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e09685323c6b2312a64daf8c74b12b5"><td class="memItemLeft" align="right" valign="top">Catch::Generators::GeneratorWrapper&lt; int * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga2e09685323c6b2312a64daf8c74b12b5">bitsets</a> (int numBits)</td></tr>
<tr class="memdesc:ga2e09685323c6b2312a64daf8c74b12b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a Catch2 generator of every <code>numBits-length</code> bit-set, in increasing lexographic order, where left-most (zero index) bit is treated as LEAST significant (opposite typical convention).  <a href="group__testutilities.html#ga2e09685323c6b2312a64daf8c74b12b5">More...</a><br /></td></tr>
<tr class="separator:ga2e09685323c6b2312a64daf8c74b12b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga267884197cf7f1d428021cb12a57360c"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga267884197cf7f1d428021cb12a57360c">calcLog2</a> (long unsigned int res)</td></tr>
<tr class="memdesc:ga267884197cf7f1d428021cb12a57360c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns log2 of numbers which must be gauranteed to be 2^n.  <a href="group__testutilities.html#ga267884197cf7f1d428021cb12a57360c">More...</a><br /></td></tr>
<tr class="separator:ga267884197cf7f1d428021cb12a57360c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dc43d4a0827b56cd004270a9c5b2604"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a9dc43d4a0827b56cd004270a9c5b2604">expI</a> (<a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> phase)</td></tr>
<tr class="memdesc:a9dc43d4a0827b56cd004270a9c5b2604"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the unit-norm complex number exp(i*<code>phase</code>).  <a href="utilities_8cpp.html#a9dc43d4a0827b56cd004270a9c5b2604">More...</a><br /></td></tr>
<tr class="separator:a9dc43d4a0827b56cd004270a9c5b2604"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3cf199a7de3bbcb3546503f25be9245a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga3cf199a7de3bbcb3546503f25be9245a">getConjugateTranspose</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> a)</td></tr>
<tr class="memdesc:ga3cf199a7de3bbcb3546503f25be9245a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the conjugate transpose of the complex square matrix <code>a</code>.  <a href="group__testutilities.html#ga3cf199a7de3bbcb3546503f25be9245a">More...</a><br /></td></tr>
<tr class="separator:ga3cf199a7de3bbcb3546503f25be9245a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac60cee26113732c491f21dc43066b605"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gac60cee26113732c491f21dc43066b605">getExponentialOfDiagonalMatrix</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> a)</td></tr>
<tr class="memdesc:gac60cee26113732c491f21dc43066b605"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the matrix exponential of a diagonal, square, complex matrix.  <a href="group__testutilities.html#gac60cee26113732c491f21dc43066b605">More...</a><br /></td></tr>
<tr class="separator:gac60cee26113732c491f21dc43066b605"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga00f4feec845c019c3390898b0cc7f1ef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga00f4feec845c019c3390898b0cc7f1ef">getExponentialOfPauliMatrix</a> (<a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> a)</td></tr>
<tr class="memdesc:ga00f4feec845c019c3390898b0cc7f1ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the matrix exponential of a kronecker product of pauli matrices (or of any involutory matrices), with exponent factor (-i <code>angle</code> / 2).  <a href="group__testutilities.html#ga00f4feec845c019c3390898b0cc7f1ef">More...</a><br /></td></tr>
<tr class="separator:ga00f4feec845c019c3390898b0cc7f1ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20f041452b43026d876fde17a5999265"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga20f041452b43026d876fde17a5999265">getFullOperatorMatrix</a> (int *ctrls, int numCtrls, int *targs, int numTargs, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op, int numQubits)</td></tr>
<tr class="memdesc:ga20f041452b43026d876fde17a5999265"><td class="mdescLeft">&#160;</td><td class="mdescRight">Takes a 2^<code>numTargs-by-2^<code>numTargs</code> matrix</code> <code>op</code> and a returns a 2^<code>numQubits-by-2^<code>numQubits</code> matrix</code> where <code>op</code> is controlled on the given <code>ctrls</code> qubits.  <a href="group__testutilities.html#ga20f041452b43026d876fde17a5999265">More...</a><br /></td></tr>
<tr class="separator:ga20f041452b43026d876fde17a5999265"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac0c6339c28256f2aae86d443fae44455"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gac0c6339c28256f2aae86d443fae44455">getIdentityMatrix</a> (size_t dim)</td></tr>
<tr class="memdesc:gac0c6339c28256f2aae86d443fae44455"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a dim-by-dim identity matrix.  <a href="group__testutilities.html#gac0c6339c28256f2aae86d443fae44455">More...</a><br /></td></tr>
<tr class="separator:gac0c6339c28256f2aae86d443fae44455"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2de7d3b138728b6beb7753b82df61803"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga2de7d3b138728b6beb7753b82df61803">getKetBra</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> ket, <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> bra)</td></tr>
<tr class="memdesc:ga2de7d3b138728b6beb7753b82df61803"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the matrix |<code>ket&gt;&lt;<code>bra|</code>,</code> with ith-jth element <code>ket(i)</code> conj(<code>bra(j)</code>), since |<code>ket&gt;&lt;<code>bra|</code> =</code> sum_i a_i|i&gt; sum_j b_j* &lt;j| = sum_{ij} a_i b_j* |i&gt;&lt;j|.  <a href="group__testutilities.html#ga2de7d3b138728b6beb7753b82df61803">More...</a><br /></td></tr>
<tr class="separator:ga2de7d3b138728b6beb7753b82df61803"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga50616e813b0d0aa4f8220785d780cdff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga50616e813b0d0aa4f8220785d780cdff">getKroneckerProduct</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> a, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> b)</td></tr>
<tr class="memdesc:ga50616e813b0d0aa4f8220785d780cdff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the kronecker product of <code>a</code> and <code>b</code>, where <code>a</code> and <code>b</code> are square but possibly differently-sized complex matrices.  <a href="group__testutilities.html#ga50616e813b0d0aa4f8220785d780cdff">More...</a><br /></td></tr>
<tr class="separator:ga50616e813b0d0aa4f8220785d780cdff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5438455c2c8ecf5948ca22875313a590"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga5438455c2c8ecf5948ca22875313a590">getNormalised</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> vec)</td></tr>
<tr class="memdesc:ga5438455c2c8ecf5948ca22875313a590"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an L2-normalised copy of <code>vec</code>, using Kahan summation for improved accuracy.  <a href="group__testutilities.html#ga5438455c2c8ecf5948ca22875313a590">More...</a><br /></td></tr>
<tr class="separator:ga5438455c2c8ecf5948ca22875313a590"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga617b0fd1eb1c395762c937ad3b23e61b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga617b0fd1eb1c395762c937ad3b23e61b">getRandomDensityMatrix</a> (int numQb)</td></tr>
<tr class="memdesc:ga617b0fd1eb1c395762c937ad3b23e61b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a random <code>numQb-by-<code>numQb</code> density</code> matrix, from an undisclosed distribution, in a very mixed state.  <a href="group__testutilities.html#ga617b0fd1eb1c395762c937ad3b23e61b">More...</a><br /></td></tr>
<tr class="separator:ga617b0fd1eb1c395762c937ad3b23e61b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7125d0747a44db58115899727ac5f6be"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga7125d0747a44db58115899727ac5f6be">getRandomInt</a> (int min, int max)</td></tr>
<tr class="memdesc:ga7125d0747a44db58115899727ac5f6be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a random integer between <code>min</code> (inclusive) and <code>max</code> (exclusive), from the uniform distribution.  <a href="group__testutilities.html#ga7125d0747a44db58115899727ac5f6be">More...</a><br /></td></tr>
<tr class="separator:ga7125d0747a44db58115899727ac5f6be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0d3b30625e2350a1e837a0b259dd3b18"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga0d3b30625e2350a1e837a0b259dd3b18">getRandomKrausMap</a> (int numQb, int numOps)</td></tr>
<tr class="memdesc:ga0d3b30625e2350a1e837a0b259dd3b18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a random Kraus map of <code>#numOps</code> 2^<code>numQb-by-2^<code>numQb</code> operators</code>, from an undisclosed distribution.  <a href="group__testutilities.html#ga0d3b30625e2350a1e837a0b259dd3b18">More...</a><br /></td></tr>
<tr class="separator:ga0d3b30625e2350a1e837a0b259dd3b18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa2e8b958e0cba07e01de9f91a5ce3c9c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gaa2e8b958e0cba07e01de9f91a5ce3c9c">getRandomQMatrix</a> (int dim)</td></tr>
<tr class="memdesc:gaa2e8b958e0cba07e01de9f91a5ce3c9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a <code>dim-by-<code>dim</code> complex</code> matrix, where the real and imaginary value of each element are independently random, under the standard normal distribution (mean 0, standard deviation 1).  <a href="group__testutilities.html#gaa2e8b958e0cba07e01de9f91a5ce3c9c">More...</a><br /></td></tr>
<tr class="separator:gaa2e8b958e0cba07e01de9f91a5ce3c9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga27dc818709394cb31247e26850215f8a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga27dc818709394cb31247e26850215f8a">getRandomQVector</a> (int dim)</td></tr>
<tr class="memdesc:ga27dc818709394cb31247e26850215f8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a <code>dim-length</code> vector with random complex amplitudes in the square joining {-1-i, 1+i}, of an undisclosed distribution.  <a href="group__testutilities.html#ga27dc818709394cb31247e26850215f8a">More...</a><br /></td></tr>
<tr class="separator:ga27dc818709394cb31247e26850215f8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacd5aadbe10ecdedaa625f85171c0a3cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gacd5aadbe10ecdedaa625f85171c0a3cd">getRandomReal</a> (<a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> min, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> max)</td></tr>
<tr class="memdesc:gacd5aadbe10ecdedaa625f85171c0a3cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a random real between <code>min</code> (inclusive) and <code>max</code> (exclusive), from the uniform distribution.  <a href="group__testutilities.html#gacd5aadbe10ecdedaa625f85171c0a3cd">More...</a><br /></td></tr>
<tr class="separator:gacd5aadbe10ecdedaa625f85171c0a3cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae1d2eb70b50267f8186cbd53e300d94f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gae1d2eb70b50267f8186cbd53e300d94f">getRandomStateVector</a> (int numQb)</td></tr>
<tr class="memdesc:gae1d2eb70b50267f8186cbd53e300d94f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a random <code>numQb-length</code> L2-normalised state-vector from an undisclosed distribution.  <a href="group__testutilities.html#gae1d2eb70b50267f8186cbd53e300d94f">More...</a><br /></td></tr>
<tr class="separator:gae1d2eb70b50267f8186cbd53e300d94f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1a5e9b668716b91dd8527ce00f7500cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga1a5e9b668716b91dd8527ce00f7500cf">getRandomUnitary</a> (int numQb)</td></tr>
<tr class="memdesc:ga1a5e9b668716b91dd8527ce00f7500cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a uniformly random (under Haar) 2^<code>numQb-by-2^<code>numQb</code> unitary</code> matrix.  <a href="group__testutilities.html#ga1a5e9b668716b91dd8527ce00f7500cf">More...</a><br /></td></tr>
<tr class="separator:ga1a5e9b668716b91dd8527ce00f7500cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37e0f375a6c50721aaf68153f750e842"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga37e0f375a6c50721aaf68153f750e842">getSwapMatrix</a> (int qb1, int qb2, int numQb)</td></tr>
<tr class="memdesc:ga37e0f375a6c50721aaf68153f750e842"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the 2^<code>numQb-by-2^<code>numQb</code> unitary</code> matrix which swaps qubits <code>qb1</code> and <code>qb2</code>; the SWAP gate of not-necessarily-adjacent qubits.  <a href="group__testutilities.html#ga37e0f375a6c50721aaf68153f750e842">More...</a><br /></td></tr>
<tr class="separator:ga37e0f375a6c50721aaf68153f750e842"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6ccbb15b0f234e926be96a153181b63a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga6ccbb15b0f234e926be96a153181b63a">getZeroMatrix</a> (size_t dim)</td></tr>
<tr class="memdesc:ga6ccbb15b0f234e926be96a153181b63a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a dim-by-dim square complex matrix, initialised to all zeroes.  <a href="group__testutilities.html#ga6ccbb15b0f234e926be96a153181b63a">More...</a><br /></td></tr>
<tr class="separator:ga6ccbb15b0f234e926be96a153181b63a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c677f35ecb3e88eba5e001fb6ed9ac5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a0c677f35ecb3e88eba5e001fb6ed9ac5">operator*</a> (const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;a, const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m)</td></tr>
<tr class="separator:a0c677f35ecb3e88eba5e001fb6ed9ac5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e8b82fba42c4fc52bf663082df09443"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a4e8b82fba42c4fc52bf663082df09443">operator*</a> (const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;a, const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v)</td></tr>
<tr class="separator:a4e8b82fba42c4fc52bf663082df09443"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a293961c8fa461ccf37b7b5351880070d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a293961c8fa461ccf37b7b5351880070d">operator*</a> (const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m, const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;a)</td></tr>
<tr class="separator:a293961c8fa461ccf37b7b5351880070d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83bf6308d94642de4416e26e19e3ad00"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a83bf6308d94642de4416e26e19e3ad00">operator*</a> (const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m, const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v)</td></tr>
<tr class="separator:a83bf6308d94642de4416e26e19e3ad00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59ee16722b772c6f8ebf8fa83ded714b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a59ee16722b772c6f8ebf8fa83ded714b">operator*</a> (const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m1, const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m2)</td></tr>
<tr class="separator:a59ee16722b772c6f8ebf8fa83ded714b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16c67de049d1e68b950bbd6e3d67bd6c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a16c67de049d1e68b950bbd6e3d67bd6c">operator*</a> (const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v, const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;a)</td></tr>
<tr class="separator:a16c67de049d1e68b950bbd6e3d67bd6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48dd911ac2c9b071e6d1497074e44051"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a48dd911ac2c9b071e6d1497074e44051">operator*</a> (const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v1, const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v2)</td></tr>
<tr class="separator:a48dd911ac2c9b071e6d1497074e44051"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46927798eee7a62bff6fe76d3ed78e33"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a46927798eee7a62bff6fe76d3ed78e33">operator*=</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m1, const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m2)</td></tr>
<tr class="separator:a46927798eee7a62bff6fe76d3ed78e33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6df034d8adce07289a78a0b80ebffd2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#af6df034d8adce07289a78a0b80ebffd2">operator*=</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m1, const <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> &amp;a)</td></tr>
<tr class="separator:af6df034d8adce07289a78a0b80ebffd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac39c5776e942f283ba52e0742a98d63f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#ac39c5776e942f283ba52e0742a98d63f">operator*=</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v1, const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;a)</td></tr>
<tr class="separator:ac39c5776e942f283ba52e0742a98d63f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83bd85cc91272c8d457a0f233a354fb8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a83bd85cc91272c8d457a0f233a354fb8">operator+</a> (const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m1, const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m2)</td></tr>
<tr class="separator:a83bd85cc91272c8d457a0f233a354fb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed39fc3a3108b8aad424c03a4b966158"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#aed39fc3a3108b8aad424c03a4b966158">operator+</a> (const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v1, const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v2)</td></tr>
<tr class="separator:aed39fc3a3108b8aad424c03a4b966158"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9353a8cc912e65453fa54a83558dce1a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a9353a8cc912e65453fa54a83558dce1a">operator+=</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m1, const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m2)</td></tr>
<tr class="separator:a9353a8cc912e65453fa54a83558dce1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91e707f38b1844fcbc0529ca41db816a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a91e707f38b1844fcbc0529ca41db816a">operator+=</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v1, const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v2)</td></tr>
<tr class="separator:a91e707f38b1844fcbc0529ca41db816a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac169eaefbce666c4f282fd2799c658a0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#ac169eaefbce666c4f282fd2799c658a0">operator-</a> (const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m1, const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m2)</td></tr>
<tr class="separator:ac169eaefbce666c4f282fd2799c658a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade72f855c80218725aa19183723af15c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#ade72f855c80218725aa19183723af15c">operator-</a> (const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v1, const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v2)</td></tr>
<tr class="separator:ade72f855c80218725aa19183723af15c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae94c0855c09cdbc87a894ba6003c0944"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#ae94c0855c09cdbc87a894ba6003c0944">operator-=</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m1, const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m2)</td></tr>
<tr class="separator:ae94c0855c09cdbc87a894ba6003c0944"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabfdeb43b039e628f9370507ab27529a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#aabfdeb43b039e628f9370507ab27529a">operator-=</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v1, const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v2)</td></tr>
<tr class="separator:aabfdeb43b039e628f9370507ab27529a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a710aa3cc5b80f470d68e094941a303c3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a710aa3cc5b80f470d68e094941a303c3">operator/</a> (const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m, const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;a)</td></tr>
<tr class="separator:a710aa3cc5b80f470d68e094941a303c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b8611d2c9af569e1265e8f48d8e0143"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a1b8611d2c9af569e1265e8f48d8e0143">operator/</a> (const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v, const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;a)</td></tr>
<tr class="separator:a1b8611d2c9af569e1265e8f48d8e0143"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e6b08e4c0e1a376f6ef04edfb5c3f54"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a1e6b08e4c0e1a376f6ef04edfb5c3f54">operator/=</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;m1, const <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> &amp;a)</td></tr>
<tr class="separator:a1e6b08e4c0e1a376f6ef04edfb5c3f54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a799b92f6c9de52c7c5a4b38e30c5d395"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a799b92f6c9de52c7c5a4b38e30c5d395">operator/=</a> (<a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v1, const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;a)</td></tr>
<tr class="separator:a799b92f6c9de52c7c5a4b38e30c5d395"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac102c131efa312dabd5462e6e2642975"><td class="memItemLeft" align="right" valign="top">Catch::Generators::GeneratorWrapper&lt; <a class="el" href="group__type.html#ga1c703cf89629e4e9c7023cd402d67028">pauliOpType</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gac102c131efa312dabd5462e6e2642975">pauliseqs</a> (int numPaulis)</td></tr>
<tr class="memdesc:gac102c131efa312dabd5462e6e2642975"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a Catch2 generator of every <code>numPaulis-length</code> set of Pauli-matrix types (or base-4 integers).  <a href="group__testutilities.html#gac102c131efa312dabd5462e6e2642975">More...</a><br /></td></tr>
<tr class="separator:gac102c131efa312dabd5462e6e2642975"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga181366c4cdc7786bcc066e8ac8342c1d"><td class="memItemLeft" align="right" valign="top">Catch::Generators::GeneratorWrapper&lt; int * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga181366c4cdc7786bcc066e8ac8342c1d">sequences</a> (int base, int numDigits)</td></tr>
<tr class="memdesc:ga181366c4cdc7786bcc066e8ac8342c1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a Catch2 generator of every <code>numDigits-length</code> sequence in the given <code>base</code>, in increasing lexographic order, where left-most (zero index) bit is treated as LEAST significant (opposite typical convention).  <a href="group__testutilities.html#ga181366c4cdc7786bcc066e8ac8342c1d">More...</a><br /></td></tr>
<tr class="separator:ga181366c4cdc7786bcc066e8ac8342c1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafaecff2462bd0b490edff484911d831e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gafaecff2462bd0b490edff484911d831e">setRandomPauliSum</a> (<a class="el" href="structPauliHamil.html">PauliHamil</a> hamil)</td></tr>
<tr class="memdesc:gafaecff2462bd0b490edff484911d831e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Populates <code>hamil</code> with random coefficients and pauli codes.  <a href="group__testutilities.html#gafaecff2462bd0b490edff484911d831e">More...</a><br /></td></tr>
<tr class="separator:gafaecff2462bd0b490edff484911d831e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga11c465ce1a5c238946a9e09d61c94c58"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga11c465ce1a5c238946a9e09d61c94c58">setRandomPauliSum</a> (<a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *coeffs, <a class="el" href="group__type.html#ga1c703cf89629e4e9c7023cd402d67028">pauliOpType</a> *codes, int numQubits, int numTerms)</td></tr>
<tr class="memdesc:ga11c465ce1a5c238946a9e09d61c94c58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Populates the <code>coeffs</code> array with random qreals in (-5, 5), and populates <code>codes</code> with random Pauli codes.  <a href="group__testutilities.html#ga11c465ce1a5c238946a9e09d61c94c58">More...</a><br /></td></tr>
<tr class="separator:ga11c465ce1a5c238946a9e09d61c94c58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga75966a02c618790c1de5f0102ab8398f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga75966a02c618790c1de5f0102ab8398f">setSubMatrix</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;dest, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> sub, size_t r, size_t c)</td></tr>
<tr class="memdesc:ga75966a02c618790c1de5f0102ab8398f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies <code>dest</code> by overwriting its submatrix (from top-left corner (<code>r</code>, <code>c</code>) to bottom-right corner (<code>r</code> + <code>dest.size()</code>, <code>c</code> + <code>dest.size()</code>) with the complete elements of sub.  <a href="group__testutilities.html#ga75966a02c618790c1de5f0102ab8398f">More...</a><br /></td></tr>
<tr class="separator:ga75966a02c618790c1de5f0102ab8398f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a454924f12712fda06dad76d455dbc08e"><td class="memItemLeft" align="right" valign="top">Catch::Generators::GeneratorWrapper&lt; int * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a454924f12712fda06dad76d455dbc08e">sublists</a> (Catch::Generators::GeneratorWrapper&lt; int &gt; &amp;&amp;gen, int numSamps)</td></tr>
<tr class="separator:a454924f12712fda06dad76d455dbc08e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd439d42d66d2c407c57c15ac379aa01"><td class="memItemLeft" align="right" valign="top">Catch::Generators::GeneratorWrapper&lt; int * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#abd439d42d66d2c407c57c15ac379aa01">sublists</a> (Catch::Generators::GeneratorWrapper&lt; int &gt; &amp;&amp;gen, int numSamps, const int *exclude, int numExclude)</td></tr>
<tr class="separator:abd439d42d66d2c407c57c15ac379aa01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6352aec92f1dbf1edcfc3d3a2a5f3d5"><td class="memItemLeft" align="right" valign="top">Catch::Generators::GeneratorWrapper&lt; int * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#ab6352aec92f1dbf1edcfc3d3a2a5f3d5">sublists</a> (Catch::Generators::GeneratorWrapper&lt; int &gt; &amp;&amp;gen, int numSamps, int excluded)</td></tr>
<tr class="separator:ab6352aec92f1dbf1edcfc3d3a2a5f3d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35add15146aa606b256df79334b867d5"><td class="memItemLeft" align="right" valign="top">Catch::Generators::GeneratorWrapper&lt; int * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga35add15146aa606b256df79334b867d5">sublists</a> (int *list, int len, int sublen)</td></tr>
<tr class="memdesc:ga35add15146aa606b256df79334b867d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a Catch2 generator of every length-<code>sublen</code> sublist of length-<code>len</code> <code>list</code>, in increasing lexographic order.  <a href="group__testutilities.html#ga35add15146aa606b256df79334b867d5">More...</a><br /></td></tr>
<tr class="separator:ga35add15146aa606b256df79334b867d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga731a7a71755c25ebe96e742e3fbe5812"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structComplexMatrix2.html">ComplexMatrix2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga731a7a71755c25ebe96e742e3fbe5812">toComplexMatrix2</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> qm)</td></tr>
<tr class="memdesc:ga731a7a71755c25ebe96e742e3fbe5812"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a <code><a class="el" href="structComplexMatrix2.html" title="Represents a 2x2 matrix of complex numbers.">ComplexMatrix2</a></code> copy of QMatix <code>qm</code>.  <a href="group__testutilities.html#ga731a7a71755c25ebe96e742e3fbe5812">More...</a><br /></td></tr>
<tr class="separator:ga731a7a71755c25ebe96e742e3fbe5812"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga216f7c25bbb0cf752d1b6fff5ea8197b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structComplexMatrix4.html">ComplexMatrix4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga216f7c25bbb0cf752d1b6fff5ea8197b">toComplexMatrix4</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> qm)</td></tr>
<tr class="memdesc:ga216f7c25bbb0cf752d1b6fff5ea8197b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a <code><a class="el" href="structComplexMatrix4.html" title="Represents a 4x4 matrix of complex numbers.">ComplexMatrix4</a></code> copy of QMatix <code>qm</code>.  <a href="group__testutilities.html#ga216f7c25bbb0cf752d1b6fff5ea8197b">More...</a><br /></td></tr>
<tr class="separator:ga216f7c25bbb0cf752d1b6fff5ea8197b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7f83695bea7d0332a577bca017dbb03c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga7f83695bea7d0332a577bca017dbb03c">toComplexMatrixN</a> (<a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> qm, <a class="el" href="structComplexMatrixN.html">ComplexMatrixN</a> cm)</td></tr>
<tr class="memdesc:ga7f83695bea7d0332a577bca017dbb03c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialises <code>cm</code> with the values of <code>qm</code>.  <a href="group__testutilities.html#ga7f83695bea7d0332a577bca017dbb03c">More...</a><br /></td></tr>
<tr class="separator:ga7f83695bea7d0332a577bca017dbb03c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad552153e13f45cf6c7d6447ae6d9551a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gad552153e13f45cf6c7d6447ae6d9551a">toQMatrix</a> (<a class="el" href="structComplex.html">Complex</a> alpha, <a class="el" href="structComplex.html">Complex</a> beta)</td></tr>
<tr class="memdesc:gad552153e13f45cf6c7d6447ae6d9551a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the matrix (where a=<code>alpha</code>, b=<code>beta</code>) {{a, -conj(b)}, {b, conj(a)}} using the <code>qcomp</code> complex type.  <a href="group__testutilities.html#gad552153e13f45cf6c7d6447ae6d9551a">More...</a><br /></td></tr>
<tr class="separator:gad552153e13f45cf6c7d6447ae6d9551a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga253946523907014c4f198d2bb38d4913"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga253946523907014c4f198d2bb38d4913">toQMatrix</a> (<a class="el" href="structComplexMatrix2.html">ComplexMatrix2</a> src)</td></tr>
<tr class="memdesc:ga253946523907014c4f198d2bb38d4913"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a copy of the given 2-by-2 matrix.  <a href="group__testutilities.html#ga253946523907014c4f198d2bb38d4913">More...</a><br /></td></tr>
<tr class="separator:ga253946523907014c4f198d2bb38d4913"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3dbd53326151e3c6c5e0de579f6554a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga3dbd53326151e3c6c5e0de579f6554a7">toQMatrix</a> (<a class="el" href="structComplexMatrix4.html">ComplexMatrix4</a> src)</td></tr>
<tr class="memdesc:ga3dbd53326151e3c6c5e0de579f6554a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a copy of the given 4-by-4 matrix.  <a href="group__testutilities.html#ga3dbd53326151e3c6c5e0de579f6554a7">More...</a><br /></td></tr>
<tr class="separator:ga3dbd53326151e3c6c5e0de579f6554a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadbcd76cb251c802e7f81803bdd23064b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gadbcd76cb251c802e7f81803bdd23064b">toQMatrix</a> (<a class="el" href="structComplexMatrixN.html">ComplexMatrixN</a> src)</td></tr>
<tr class="memdesc:gadbcd76cb251c802e7f81803bdd23064b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a copy of the given 2^<code>N-by-2^<code>N</code> matrix</code>.  <a href="group__testutilities.html#gadbcd76cb251c802e7f81803bdd23064b">More...</a><br /></td></tr>
<tr class="separator:gadbcd76cb251c802e7f81803bdd23064b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga95a4a8d36ad12018f5ffe92f39f4cfb8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga95a4a8d36ad12018f5ffe92f39f4cfb8">toQMatrix</a> (<a class="el" href="structDiagonalOp.html">DiagonalOp</a> op)</td></tr>
<tr class="memdesc:ga95a4a8d36ad12018f5ffe92f39f4cfb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a 2^<code>N-by-2^<code>N</code> complex</code> diagonal matrix form of the <a class="el" href="structDiagonalOp.html" title="Represents a diagonal complex operator on the full Hilbert state of a Qureg.">DiagonalOp</a>.  <a href="group__testutilities.html#ga95a4a8d36ad12018f5ffe92f39f4cfb8">More...</a><br /></td></tr>
<tr class="separator:ga95a4a8d36ad12018f5ffe92f39f4cfb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae1131c2c5e1a36b5b6e2b614c6d7cdc8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gae1131c2c5e1a36b5b6e2b614c6d7cdc8">toQMatrix</a> (<a class="el" href="structPauliHamil.html">PauliHamil</a> hamil)</td></tr>
<tr class="memdesc:gae1131c2c5e1a36b5b6e2b614c6d7cdc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a 2^<code>N-by-2^<code>N</code> Hermitian</code> matrix form of the <a class="el" href="structPauliHamil.html" title="Represents a weighted sum of pauli products.">PauliHamil</a>.  <a href="group__testutilities.html#gae1131c2c5e1a36b5b6e2b614c6d7cdc8">More...</a><br /></td></tr>
<tr class="separator:gae1131c2c5e1a36b5b6e2b614c6d7cdc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga29dd7da2b0f2104a90c88fb081e67a0e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga29dd7da2b0f2104a90c88fb081e67a0e">toQMatrix</a> (<a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *coeffs, <a class="el" href="group__type.html#ga1c703cf89629e4e9c7023cd402d67028">pauliOpType</a> *paulis, int numQubits, int numTerms)</td></tr>
<tr class="memdesc:ga29dd7da2b0f2104a90c88fb081e67a0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a 2^<code>N-by-2^<code>N</code> Hermitian</code> matrix form of the specified weighted sum of Pauli products.  <a href="group__testutilities.html#ga29dd7da2b0f2104a90c88fb081e67a0e">More...</a><br /></td></tr>
<tr class="separator:ga29dd7da2b0f2104a90c88fb081e67a0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4c4ce1767ee2ef420c0078ea5991aeb0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga4c4ce1767ee2ef420c0078ea5991aeb0">toQMatrix</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:ga4c4ce1767ee2ef420c0078ea5991aeb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an equal-size copy of the given density matrix <code>qureg</code>.  <a href="group__testutilities.html#ga4c4ce1767ee2ef420c0078ea5991aeb0">More...</a><br /></td></tr>
<tr class="separator:ga4c4ce1767ee2ef420c0078ea5991aeb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5e1bcff9f5867273c4d413a60dc78e8e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga5e1bcff9f5867273c4d413a60dc78e8e">toQureg</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> mat)</td></tr>
<tr class="memdesc:ga5e1bcff9f5867273c4d413a60dc78e8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialises the density matrix <code>qureg</code> to have the same amplitudes as <code>mat</code>.  <a href="group__testutilities.html#ga5e1bcff9f5867273c4d413a60dc78e8e">More...</a><br /></td></tr>
<tr class="separator:ga5e1bcff9f5867273c4d413a60dc78e8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf5a18d4c00dfe0523972be3bfc666362"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gaf5a18d4c00dfe0523972be3bfc666362">toQureg</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> vec)</td></tr>
<tr class="memdesc:gaf5a18d4c00dfe0523972be3bfc666362"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialises the state-vector <code>qureg</code> to have the same amplitudes as <code>vec</code>.  <a href="group__testutilities.html#gaf5a18d4c00dfe0523972be3bfc666362">More...</a><br /></td></tr>
<tr class="separator:gaf5a18d4c00dfe0523972be3bfc666362"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga09f18ab46d2b17ad13185c0b4c06b400"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#ga09f18ab46d2b17ad13185c0b4c06b400">toQVector</a> (<a class="el" href="structDiagonalOp.html">DiagonalOp</a> op)</td></tr>
<tr class="memdesc:ga09f18ab46d2b17ad13185c0b4c06b400"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a vector with the same of the full diagonal operator, populated with <code>op's</code> elements.  <a href="group__testutilities.html#ga09f18ab46d2b17ad13185c0b4c06b400">More...</a><br /></td></tr>
<tr class="separator:ga09f18ab46d2b17ad13185c0b4c06b400"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gade0e7c37811a69f1c21c88c11943a19f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__testutilities.html#gade0e7c37811a69f1c21c88c11943a19f">toQVector</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:gade0e7c37811a69f1c21c88c11943a19f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an equal-size copy of the given state-vector <code>qureg</code>.  <a href="group__testutilities.html#gade0e7c37811a69f1c21c88c11943a19f">More...</a><br /></td></tr>
<tr class="separator:gade0e7c37811a69f1c21c88c11943a19f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a70927d32d5ddd0f704767919d8ed01"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utilities_8cpp.html#a5a70927d32d5ddd0f704767919d8ed01">updateIndices</a> (int oldEl, int newEl, int *list1, int len1, int *list2, int len2)</td></tr>
<tr class="separator:a5a70927d32d5ddd0f704767919d8ed01"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Unoptimised, analytic implementations of matrix operations used by QuEST_unit_tests</p>
<dl class="section author"><dt>Author</dt><dd>Tyson Jones </dd></dl>

<p class="definition">Definition in file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="aba8ab64f4403dbfbd5a38902939535ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba8ab64f4403dbfbd5a38902939535ff">&#9670;&nbsp;</a></span>DEMAND</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DEMAND</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">cond</td><td>)</td>
          <td>&#160;&#160;&#160;if (!(cond)) FAIL( );</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00024">24</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>

</div>
</div>
<a id="a21e0fa8d57dc566ad149077be8f67a82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21e0fa8d57dc566ad149077be8f67a82">&#9670;&nbsp;</a></span>macro_copyComplexMatrix</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define macro_copyComplexMatrix</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">dest, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">src&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">    { \</div>
<div class="line">    for (<span class="keywordtype">size_t</span> i=0; i&lt;dest.size(); i++) \</div>
<div class="line">        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j=0; j&lt;dest.size(); j++) \</div>
<div class="line">            dest[i][j] = <a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>(src.real[i][j], src.imag[i][j]); \</div>
<div class="line">}</div>
</div><!-- fragment -->
<p>Copies ComplexMatrix structures into a QMatrix. </p>

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00864">864</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>

</div>
</div>
<a id="a3ab1cbd3fcacfb4f40e6898da03f8705"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ab1cbd3fcacfb4f40e6898da03f8705">&#9670;&nbsp;</a></span>macro_copyQMatrix</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define macro_copyQMatrix</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">dest, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">src&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">    { \</div>
<div class="line">    for (<span class="keywordtype">size_t</span> i=0; i&lt;src.size(); i++) { \</div>
<div class="line">        for (<span class="keywordtype">size_t</span> j=0; j&lt;src.size(); j++) { \</div>
<div class="line">            dest.real[i][j] = real(src[i][j]); \</div>
<div class="line">            dest.imag[i][j] = imag(src[i][j]); \</div>
<div class="line">        } \</div>
<div class="line">    } \</div>
<div class="line">}</div>
</div><!-- fragment -->
<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00838">838</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a9dc43d4a0827b56cd004270a9c5b2604"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9dc43d4a0827b56cd004270a9c5b2604">&#9670;&nbsp;</a></span>expI()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> expI </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td>
          <td class="paramname"><em>phase</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the unit-norm complex number exp(i*<code>phase</code>). </p>
<p>This function uses the Euler formula, and avoids problems with calling exp(<b>complex</b>) in a platform agnostic way </p>

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00406">406</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;                        {</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    <span class="keywordflow">return</span> cos(phase) + 1i*sin(phase);</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="test__unitaries_8cpp_source.html#l00046">TEST_CASE()</a>.</p>

</div>
</div>
<a id="a0c677f35ecb3e88eba5e001fb6ed9ac5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c677f35ecb3e88eba5e001fb6ed9ac5">&#9670;&nbsp;</a></span>operator*() <span class="overload">[1/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> operator* </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00092">92</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                                                      {</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> out = m;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> r=0; r&lt;m.size(); r++)</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> c=0; c&lt;m.size(); c++)</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            out[r][c] *= a;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a4e8b82fba42c4fc52bf663082df09443"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e8b82fba42c4fc52bf663082df09443">&#9670;&nbsp;</a></span>operator*() <span class="overload">[2/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> operator* </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00040">40</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                                                      {</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> out = v;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;v.size(); i++)</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        out[i] *= a;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a293961c8fa461ccf37b7b5351880070d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a293961c8fa461ccf37b7b5351880070d">&#9670;&nbsp;</a></span>operator*() <span class="overload">[3/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> operator* </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00099">99</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;                                                      {</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordflow">return</span> a * m;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a83bf6308d94642de4416e26e19e3ad00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83bf6308d94642de4416e26e19e3ad00">&#9670;&nbsp;</a></span>operator*() <span class="overload">[4/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> operator* </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00134">134</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                                                        {</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <a class="code" href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a>( m.size() == v.size() );</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> prod = <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>(v.size());</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> r=0; r&lt;v.size(); r++)</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> c=0; c&lt;v.size(); c++)</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            prod[r] += m[r][c] * v[c];</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="keywordflow">return</span> prod;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l00024">DEMAND</a>.</p>

</div>
</div>
<a id="a59ee16722b772c6f8ebf8fa83ded714b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59ee16722b772c6f8ebf8fa83ded714b">&#9670;&nbsp;</a></span>operator*() <span class="overload">[5/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> operator* </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00109">109</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                                                          {</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> prod = m1; <span class="comment">// will be completely overwritten</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> r=0; r&lt;m1.size(); r++)</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> c=0; c&lt;m1.size(); c++) {</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            prod[r][c] = 0;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> k=0; k&lt;m1.size(); k++)</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;                prod[r][c] += m1[r][k] * m2[k][c];</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        }</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordflow">return</span> prod;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a16c67de049d1e68b950bbd6e3d67bd6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16c67de049d1e68b950bbd6e3d67bd6c">&#9670;&nbsp;</a></span>operator*() <span class="overload">[6/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> operator* </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00046">46</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;                                                      {</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keywordflow">return</span> a * v;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a48dd911ac2c9b071e6d1497074e44051"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48dd911ac2c9b071e6d1497074e44051">&#9670;&nbsp;</a></span>operator*() <span class="overload">[7/7]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> operator* </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00056">56</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;                                                        {</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="comment">// this is sum_i v1_i conj(v2_i)</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <a class="code" href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a>( v1.size() == v2.size() );</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> out = 0;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;v1.size(); i++)</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        out += v1[i] * conj(v2[i]);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l00024">DEMAND</a>, and <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>.</p>

</div>
</div>
<a id="a46927798eee7a62bff6fe76d3ed78e33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46927798eee7a62bff6fe76d3ed78e33">&#9670;&nbsp;</a></span>operator*=() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void operator*= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00131">131</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                                                  {</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    m1 = m1 * m2;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="af6df034d8adce07289a78a0b80ebffd2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6df034d8adce07289a78a0b80ebffd2">&#9670;&nbsp;</a></span>operator*=() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void operator*= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00125">125</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                                               {</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    m1 = m1 * a;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="ac39c5776e942f283ba52e0742a98d63f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac39c5776e942f283ba52e0742a98d63f">&#9670;&nbsp;</a></span>operator*=() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void operator*= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00070">70</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                                               {</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    v1 = v1 * a;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a83bd85cc91272c8d457a0f233a354fb8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83bd85cc91272c8d457a0f233a354fb8">&#9670;&nbsp;</a></span>operator+() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> operator+ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00076">76</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;                                                          {</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <a class="code" href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a>( m1.size() == m2.size() );</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> out = m1;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> r=0; r&lt;m1.size(); r++)</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> c=0; c&lt;m1.size(); c++)</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;            out[r][c] += m2[r][c];</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l00024">DEMAND</a>.</p>

</div>
</div>
<a id="aed39fc3a3108b8aad424c03a4b966158"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed39fc3a3108b8aad424c03a4b966158">&#9670;&nbsp;</a></span>operator+() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> operator+ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00026">26</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;                                                          {</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <a class="code" href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a>( v1.size() == v2.size() );</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> out = v1;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;v2.size(); i++)</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        out[i] += v2[i];</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l00024">DEMAND</a>.</p>

</div>
</div>
<a id="a9353a8cc912e65453fa54a83558dce1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9353a8cc912e65453fa54a83558dce1a">&#9670;&nbsp;</a></span>operator+=() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void operator+= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00119">119</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                                                  {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    m1 = m1 + m2;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a91e707f38b1844fcbc0529ca41db816a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a91e707f38b1844fcbc0529ca41db816a">&#9670;&nbsp;</a></span>operator+=() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void operator+= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00064">64</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                                                  { <span class="comment">// these violate += returns (fine)</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    v1 = v1 + v2;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="ac169eaefbce666c4f282fd2799c658a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac169eaefbce666c4f282fd2799c658a0">&#9670;&nbsp;</a></span>operator-() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> operator- </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00084">84</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                                                          {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <a class="code" href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a>( m1.size() == m2.size() );</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> out = m1;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> r=0; r&lt;m1.size(); r++)</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> c=0; c&lt;m1.size(); c++)</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;            out[r][c] -= m2[r][c];</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l00024">DEMAND</a>.</p>

</div>
</div>
<a id="ade72f855c80218725aa19183723af15c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade72f855c80218725aa19183723af15c">&#9670;&nbsp;</a></span>operator-() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> operator- </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00033">33</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;                                                          {</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <a class="code" href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a>( v1.size() == v2.size() );</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> out = v1;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;v2.size(); i++)</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        out[i] -= v2[i];</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l00024">DEMAND</a>.</p>

</div>
</div>
<a id="ae94c0855c09cdbc87a894ba6003c0944"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae94c0855c09cdbc87a894ba6003c0944">&#9670;&nbsp;</a></span>operator-=() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void operator-= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00122">122</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;                                                  {</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    m1 = m1 - m2;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="aabfdeb43b039e628f9370507ab27529a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aabfdeb43b039e628f9370507ab27529a">&#9670;&nbsp;</a></span>operator-=() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void operator-= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00067">67</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;                                                  {</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    v1 = v1 - v2;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a710aa3cc5b80f470d68e094941a303c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a710aa3cc5b80f470d68e094941a303c3">&#9670;&nbsp;</a></span>operator/() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> operator/ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00102">102</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;                                                      {</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> out = m;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> r=0; r&lt;m.size(); r++)</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> c=0; c&lt;m.size(); c++)</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;            out[r][c] /= a;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a1b8611d2c9af569e1265e8f48d8e0143"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b8611d2c9af569e1265e8f48d8e0143">&#9670;&nbsp;</a></span>operator/() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> operator/ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00049">49</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;                                                      {</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <a class="code" href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a>( abs(a) != 0 );</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> out = v;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;v.size(); i++)</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        out[i] /= a;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="utilities_8cpp_source.html#l00024">DEMAND</a>.</p>

</div>
</div>
<a id="a1e6b08e4c0e1a376f6ef04edfb5c3f54"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e6b08e4c0e1a376f6ef04edfb5c3f54">&#9670;&nbsp;</a></span>operator/=() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void operator/= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;&#160;</td>
          <td class="paramname"><em>m1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00128">128</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                                               {</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    m1 = m1 / a;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a799b92f6c9de52c7c5a4b38e30c5d395"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a799b92f6c9de52c7c5a4b38e30c5d395">&#9670;&nbsp;</a></span>operator/=() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void operator/= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00073">73</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;                                               {</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    v1 = v1 / a;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a454924f12712fda06dad76d455dbc08e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a454924f12712fda06dad76d455dbc08e">&#9670;&nbsp;</a></span>sublists() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Catch::Generators::GeneratorWrapper&lt;int*&gt; sublists </td>
          <td>(</td>
          <td class="paramtype">Catch::Generators::GeneratorWrapper&lt; int &gt; &amp;&amp;&#160;</td>
          <td class="paramname"><em>gen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numSamps</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01221">1221</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l01223"></a><span class="lineno"> 1223</span>&#160;  {</div>
<div class="line"><a name="l01224"></a><span class="lineno"> 1224</span>&#160;    <span class="keywordtype">int</span> exclude[] = {};  </div>
<div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>&#160;    <span class="keywordflow">return</span> Catch::Generators::GeneratorWrapper&lt;int*&gt;(</div>
<div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>&#160;        std::unique_ptr&lt;Catch::Generators::IGenerator&lt;int*&gt;&gt;(</div>
<div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>&#160;            <span class="keyword">new</span> <a class="code" href="classSubListGenerator.html">SubListGenerator</a>(std::move(gen), numSamps, exclude, 0)));</div>
<div class="line"><a name="l01228"></a><span class="lineno"> 1228</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="abd439d42d66d2c407c57c15ac379aa01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd439d42d66d2c407c57c15ac379aa01">&#9670;&nbsp;</a></span>sublists() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Catch::Generators::GeneratorWrapper&lt;int*&gt; sublists </td>
          <td>(</td>
          <td class="paramtype">Catch::Generators::GeneratorWrapper&lt; int &gt; &amp;&amp;&#160;</td>
          <td class="paramname"><em>gen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numSamps</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>exclude</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numExclude</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01206">1206</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>&#160;  {    </div>
<div class="line"><a name="l01209"></a><span class="lineno"> 1209</span>&#160;    <span class="keywordflow">return</span> Catch::Generators::GeneratorWrapper&lt;int*&gt;(</div>
<div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>&#160;        std::unique_ptr&lt;Catch::Generators::IGenerator&lt;int*&gt;&gt;(</div>
<div class="line"><a name="l01211"></a><span class="lineno"> 1211</span>&#160;            <span class="keyword">new</span> <a class="code" href="classSubListGenerator.html">SubListGenerator</a>(std::move(gen), numSamps, exclude, numExclude)));</div>
<div class="line"><a name="l01212"></a><span class="lineno"> 1212</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="ab6352aec92f1dbf1edcfc3d3a2a5f3d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6352aec92f1dbf1edcfc3d3a2a5f3d5">&#9670;&nbsp;</a></span>sublists() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Catch::Generators::GeneratorWrapper&lt;int*&gt; sublists </td>
          <td>(</td>
          <td class="paramtype">Catch::Generators::GeneratorWrapper&lt; int &gt; &amp;&amp;&#160;</td>
          <td class="paramname"><em>gen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numSamps</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>excluded</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l01213">1213</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l01215"></a><span class="lineno"> 1215</span>&#160;  {</div>
<div class="line"><a name="l01216"></a><span class="lineno"> 1216</span>&#160;    <span class="keywordtype">int</span> exclude[] = {excluded};  </div>
<div class="line"><a name="l01217"></a><span class="lineno"> 1217</span>&#160;    <span class="keywordflow">return</span> Catch::Generators::GeneratorWrapper&lt;int*&gt;(</div>
<div class="line"><a name="l01218"></a><span class="lineno"> 1218</span>&#160;        std::unique_ptr&lt;Catch::Generators::IGenerator&lt;int*&gt;&gt;(</div>
<div class="line"><a name="l01219"></a><span class="lineno"> 1219</span>&#160;            <span class="keyword">new</span> <a class="code" href="classSubListGenerator.html">SubListGenerator</a>(std::move(gen), numSamps, exclude, 1)));</div>
<div class="line"><a name="l01220"></a><span class="lineno"> 1220</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a5a70927d32d5ddd0f704767919d8ed01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a70927d32d5ddd0f704767919d8ed01">&#9670;&nbsp;</a></span>updateIndices()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void updateIndices </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>oldEl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newEl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>list1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>list2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="utilities_8cpp_source.html#l00276">276</a> of file <a class="el" href="utilities_8cpp_source.html">utilities.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;                                                                                     {</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    <span class="keywordflow">if</span> (list1 != NULL) {</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;len1; i++) {</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;            <span class="keywordflow">if</span> (list1[i] == oldEl) {</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;                list1[i] = newEl;</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;                <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;            }</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        }</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    }</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;len2; i++) {</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        <span class="keywordflow">if</span> (list2[i] == oldEl) {</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;            list2[i] = newEl;</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;        }</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    }</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="utilities_8cpp_source.html#l00293">getFullOperatorMatrix()</a>.</p>

</div>
</div>
</div><!-- contents -->
<div class="ttc" id="aclassSubListGenerator_html"><div class="ttname"><a href="classSubListGenerator.html">SubListGenerator</a></div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01099">utilities.cpp:1099</a></div></div>
<div class="ttc" id="agroup__testutilities_html_gac9263a65c96a458b810b20baa81c5b94"><div class="ttname"><a href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a></div><div class="ttdeci">std::vector&lt; qcomp &gt; QVector</div><div class="ttdoc">A complex vector, which can be zero-initialised with QVector(numAmps).</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8hpp_source.html#l00060">utilities.hpp:60</a></div></div>
<div class="ttc" id="agroup__type_html_gad863c5878a01051a2726ce94bf365428"><div class="ttname"><a href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a></div><div class="ttdeci">#define qcomp</div></div>
<div class="ttc" id="agroup__testutilities_html_gabbc686f5f40eff22e08a2b2012ac4e41"><div class="ttname"><a href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; qcomp &gt; &gt; QMatrix</div><div class="ttdoc">A complex square matrix.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8hpp_source.html#l00049">utilities.hpp:49</a></div></div>
<div class="ttc" id="autilities_8cpp_html_aba8ab64f4403dbfbd5a38902939535ff"><div class="ttname"><a href="utilities_8cpp.html#aba8ab64f4403dbfbd5a38902939535ff">DEMAND</a></div><div class="ttdeci">#define DEMAND(cond)</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00024">utilities.cpp:24</a></div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
</body>
        <script type="text/javascript" src="boot.js"></script>
</html>
